﻿@using Webdiyer.WebControls.Mvc;
@using MinistryStandardPlatformWeb;
@using MinistryStandardPlatformWeb.Models;
@model PagedList<MinistryStandardPlatformWeb.Models.OverSpeedWarning>
<style>
    a
    {
        color: #428bca;
        text-decoration: none;
        cursor: pointer;
    }

    a:hover, a:focus
    {
        color: #2a6496;
        text-decoration: underline;
    }

    select
    {
        height: auto;
    }
</style>
<table class="tablelist" id="mileagestatistics">
    <thead>
        <tr>
            <th>车牌号</th>
            <th>所属单位</th>
            <th>报警时间</th>
            <th>行驶速度(km/h)</th>
            <th>限定速度(km/h)</th>
            <th>地理位置</th>
            <th style="display:none">经度</th>
            <th style="display:none">纬度</th>
        </tr>
    </thead>
    <tbody>
        @{
            foreach (var item in Model)
            {
            <tr id="@item.VehicleId">
                <td>@item.VehicleId</td>
                <td>@item.ParentUnitName</td>
                <td>@item.WarningTime</td>
                <td>@item.Speed</td>
                <td>@item.SpeedLimit</td>
                <td>@item.POI</td>
                <td style="display:none">@item.longitude</td>
                <td style="display:none">@item.latitude</td>
            </tr>
            }
        }
    </tbody>
</table>
<div style="margin-top: 5px;">
    <div style="float: left; margin-left: 10px; height: 27px; line-height: 27px; vertical-align: middle">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</div>
    @Html.MyPager(@Model, "pagerDiv", "margin-right:10px;margin-left:30px;float:left;")
    <div style="float: right; margin-right: 10px;">
        <form action="/OverSpeedWarning/ExportData" method="post" id="form">
            <input type="button" value="导出统计结果" id="exportStatistics" onclick="exportclick();"/>
        </form>
    </div>
</div>

<script>
    function exportclick()
    {
        artDialogConfirm("导出报表时需要解析大批量的地理位置数据，将花费较长时间,请您耐心等待。<br />您可以继续浏览本报表的数据，但是关闭该报表后将接受不到导出的excel表格。",
            function () {
                $("#exportStatistics").attr("disabled", "disabled");
                $("#form").submit();
            });
    }
</script>
